const Router = require('koa-router')

const { register,wxLogin,userLogin } = require('../controller/user_controller')

const { userVerify,userIsExist_reg,crpytPassword,loginVerify,userIsExist_login } = require('../middleware/user_middleware')

const router = new Router({ prefix: '/user' })

router.post('/register',userVerify,userIsExist_reg,crpytPassword,register )

router.post('/userlogin',userVerify,userIsExist_login,loginVerify,userLogin)

module.exports = router